#!/usr/bin/env python3
# -*- coding: utf-8 -*-
{% if have_datetime_column %}
from datetime import datetime
{% endif %}
from pydantic import ConfigDict

from backend.common.schema import SchemaBase


class {{ schema_name }}SchemaBase(SchemaBase):
    {% for model in models %}
    {{ model.name }}: {% if model.nullable %}{{ model.pd_type }} | None = None{% else %}{{ model.pd_type }}{% endif %}

    {% endfor %}


class Create{{ schema_name }}Param({{ schema_name }}SchemaBase):
    pass


class Update{{ schema_name }}Param({{ schema_name }}SchemaBase):
    pass


class Get{{ schema_name }}ListDetails({{ schema_name }}SchemaBase):
    model_config = ConfigDict(from_attributes=True)

    id: int
    {% if have_datetime_column %}
    created_time: datetime
    updated_time: datetime | None = None
    {% endif %}
